new Vue({
    el: '#app',
    data: {
        username: '',
        password: '',
    },
    methods: {
        submitForm() {
            let params = new URLSearchParams()
            params.append("op", "adminLogin");
            params.append("userName", this.username);
            params.append("passWord", this.password);
            axios.post('user.action', params).then(res => {
                if (res.data.code == "500") {
                    this.$message.error(res.data.message);
                } else {
                    window.location.href = "admin.html";
                }
            });

        },
        resetForm() {
            this.username = '';
            this.password = '';
        }
    }
});